﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GEPSCodeTemplate
{
    public partial class InputDialog : Form
    {
        private string _result = "";
        public string Result 
        {
            get { return _result; }
        }

        private InputDialog()
        {
            InitializeComponent();
        }

        public static string ShowInputDialog(string property,  string initContent="", string caption = "")
        {
            InputDialog oInputDialog = new InputDialog();
            oInputDialog.txtContent.Text = initContent;
            oInputDialog.lblProperty.Text = property;
            oInputDialog.Text = caption;
            oInputDialog.ShowDialog();
            return oInputDialog.Result;
        }

        private void txtContent_TextChanged(object sender, EventArgs e)
        {
            _result = txtContent.Text;
        }
    }
}
